package com.benefm.multipar.pad.dashboard;

import android.text.TextUtils;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.benefm.multipar.pad.R;
import com.benefm.multipar.pad.model.PersonInfo;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import java.util.List;

public class OnlineDeviceAdapter extends BaseQuickAdapter<PersonInfo, BaseViewHolder> {


    public OnlineDeviceAdapter(@Nullable List<PersonInfo> data) {
        super(R.layout.item_online_device, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, PersonInfo personInfo) {

        holder.setText(R.id.textName, TextUtils.isEmpty(personInfo.name) ? "--" : personInfo.name);
//
        holder.setText(R.id.textSn, TextUtils.isEmpty(personInfo.deviceSn) ? "--" : personInfo.deviceSn);
//
//        holder.setText(R.id.textMac, personInfo.mac);
//
//        holder.setText(R.id.textStatus, "1".equals(personInfo.onlineStatus) ? "在线" : "离线");

    }
}
